private void sendMessage() {
    try {
        lsocket = new LocalSocket();
        LocalSocketAddress address = new LocalSocketAddress("server-socket", LocalSocketAddress.Namespace.ABSTRACT);
        lsocket.connect(address);
        String result;
        Log.i("test","rootclient send cmd to rootServer cmd = " + sendCmdText.getText().toString());
        br = new BufferedWriter(new OutputStreamWriter(lsocket.getOutputStream()));
        br.write(sendCmdText.getText().toString());
        br.newLine();
        br.flush();
//            br.close();

        Log.d("test", "========发送成功========");
        InputStream inputStream = lsocket.getInputStream();
        BufferedReader buffer = null;
        buffer = new BufferedReader(new InputStreamReader(inputStream));
        String tmpStr = null;
        while(inputStream.available() == 0) {
            try {
            //    Log.d("lsm", "========sleep======== inputStream.available() = " +inputStream.available());
                Thread.sleep(1);
            }catch (Exception e) {

            }
        }
        byte[] buf = new byte[inputStream.available() -1];
        inputStream.read(buf,0,inputStream.available() -1) ;
        String str =new String(buf);
        Log.d("test", "========接受成功======== inputStream.available() = " +inputStream.available() + "read str  = " +str);
        final String str1 = str;
        runOnUiThread(new Runnable() {
            @Override
            public void run() {
                receiveText.setText(str1);
            }
        });

        buffer.close();
        lsocket.close();
    } catch (IOException e) {
        e.printStackTrace();
        Log.i("test","rootclient rootServer 发送失败",e);
    }
}